import { createRouter, createWebHistory} from 'vue-router';
import Login from '@/views/Login.vue';
import RoomList from '@/views/RoomList.vue';
import Home from '@/views/Home.vue';
import Register from '@/views/Register.vue';
import Game from "../views/Game.vue";
import Show from "../views/Show.vue";
import LeaderBoard from "../views/LeaderBoard.vue";

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/show',
    name: 'Show',
    component: Show
  },
  {
    path: '/game',
    name: 'Game',
    component: Game,
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    meta: { requiresAuth: true }
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/roomlist',
    name: 'RoomList',
    component: RoomList,
    meta: { requiresAuth: true }
  },
  {
    path: '/leaderboard',
    name: 'LeaderBoard',
    component: LeaderBoard
  }
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
});



export default router;